#ifndef FILETREEVIEW_H
#define FILETREEVIEW_H

#include <QTreeView>
#include <QStandardItemModel>
#include <QMenu>
#include <QAction>
#include <QFileSystemModel>
#include <QScreen>
#include <QDebug>
#include <QMouseEvent>
#include <QInputDialog>
#include <QMessageBox>
#include <QHeaderView>

class FileTreeView : public QTreeView
{
    Q_OBJECT
public:
    explicit FileTreeView(QWidget* parent = nullptr);
    ~FileTreeView();
public:
    void iniFileTreeView();

public:
    void createActions();
    void createMenus();
public:
    void mousePressEvent(QMouseEvent *event) override;
    void contextMenuEvent(QContextMenuEvent *event) override;
    //void customContextMenuRequested(QPoint *pos) override;

public slots:
    void on_popRightMenu(const QPoint &pos);
    void on_actAddFolder_triggered();
    void on_actRemoveFolder_triggered();

private:
    QFileSystemModel *fileModel;

    // menus
    QMenu* popMenuOnFolder;

    // actions
    QAction* actAddFolder;
    QAction* actRemoveFolder;

};
#endif // FILETREEVIEW_H
